package com.cqut.service;

import com.cqut.VO.course.CourseDetailsVO;
import com.cqut.VO.course.CourseListDisplayVO;
import com.cqut.entity.UserCourse;
import com.cqut.VO.courseMemberInfo.StudentInfoVO;
import com.cqut.VO.courseMemberInfo.TeacherInfoVO;
import com.cqut.entity.Course;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 服务类
 * </p>
 *
 * @author 冯永龙
 * @since 2021-06-15
 */
public interface CourseService {
    /**
     * 根据用户id和类型查询当前课程
     *
     * @param id   用户id
     * @param type 0为教，1为学
     * @return
     */
    Map<String, List<CourseListDisplayVO>> getCourses(int id, int type);

    /**
     * @param courseId
     * @return
     */
    boolean deleteCourseById(int courseId);

    boolean updateCourse(Course course);

    boolean createCourse(Course course, Integer userId, Integer sort);

    boolean addCourse(String courseCode, Integer userId, Integer sort);

    List<TeacherInfoVO> getTeachTeamList(Integer courseId);

    List<StudentInfoVO> getStudentList(Integer courseId);

    boolean updateRankCourse(List<UserCourse> courses);

    CourseDetailsVO getCourseDetails(Integer courseId);

    boolean quitCourse(Integer courseId, Integer userId);

}
